package com.wxapp.common.constant.pojo.vo;

import com.wxapp.common.constant.enums.SysNameEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import org.springframework.http.HttpMethod;

/**
 * @author lgl
 * @Description
 * @Datetime 2023/9/14 9:54
 * @Modified By
 */
@Builder
@Data

public class FeignRequestVo<T> {
    /**
     * 系统类型
     */
    private SysNameEnum sysNameEnum;
    /**
     * 请求url
     */
    private String url;
    /**
     * 请求token
     */
    @Builder.Default
    private String token="";
    /**
     * 请求参数
     */
    @Builder.Default
    private T params=null;
    /**
     * 请求类型
     */
    private HttpMethod httpMethod;

    public FeignRequestVo(SysNameEnum sysNameEnum, String url, HttpMethod httpMethod, T params) {
        this.sysNameEnum = sysNameEnum;
        this.url = url;
        this.params = params;

    }

    public FeignRequestVo(SysNameEnum sysNameEnum, String url, String token, T params, HttpMethod httpMethod) {
        this.sysNameEnum = sysNameEnum;
        this.url = url;
        this.token = token;
        this.params = params;
        this.httpMethod = httpMethod;
    }

    public FeignRequestVo(SysNameEnum sysNameEnum, String url, HttpMethod httpMethod) {
        this.sysNameEnum = sysNameEnum;
        this.url = url;
        this.httpMethod = httpMethod;
    }
}
